package com.messaging;

/**
 Object that is used for storing indexes of already processed packets.<br/>
    It exists, because ack packet from receiver can lost, but receiver has been already processed packet and no other processing is need<br/>
    but sender do not know, because did not receive ack packet and resends data packet again
 */
public class ProcessedPacket {

    private int addressFrom;
    private int ackIndex;
    private int time;
    private final int port;

    public ProcessedPacket(int addressFrom, int port, int ackIndex, int time) {
        this.addressFrom = addressFrom;
        this.ackIndex = ackIndex;
        this.time = time;
        this.port = port;
    }

    public int getPort() {
        return port;
    }

    public int getAddressFrom() {
        return addressFrom;
    }

    public void setAddressFrom(int addressFrom) {
        this.addressFrom = addressFrom;
    }

    public int getAckIndex() {
        return ackIndex;
    }

    public void setAckIndex(int ackIndex) {
        this.ackIndex = ackIndex;
    }

    public int getTime() {
        return time;
    }

    public void setTime(int time) {
        this.time = time;
    }

}
